﻿using NUnit.Framework;

namespace CsvImporter.Test
{
  [TestFixture]
  class TestFileReader
  {
    [Test]
    public void EmptyFile()
    {
      var result = FileReader.Read("TestFileReaderEmptyFile.csv");
      var expected = new string[0];
      Assert.That(result, Is.EqualTo(expected));
    }


    [Test]
    public void OneLine()
    {
      var result = FileReader.Read("TestFileReaderOneLine.csv");
      var expected = new[]
                       {
                         "klajkjhgkjhkjghkjn,khgj3453454ääöäööfhdkjhg"
                       };
      Assert.That(result, Is.EqualTo(expected));
    }

    [Test]
    public void ThreeLines()
    {
      var result = FileReader.Read("TestFileReaderThreeLines.csv");
      var expected = new[]
                       {
                         "kjlkjdlkjd;ölöälöäl,6757657656",
                         "786868967,87678687786877687678678",
                         ";"
                       };
      Assert.That(result, Is.EqualTo(expected));
    }


  }
}
